package com.example.demo.mp.entity.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.example.demo.core.base.BizEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 画布节点实体
 * </p>
 *
 * @author JXY
 * @since 2022-03-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("canvas_node")
public class CanvasNodeEntity extends BizEntity<CanvasNodeEntity> {

    private static final long serialVersionUID = 1L;

    /**
     * 画布id
     */
    @TableField("canvas_id")
    private Long canvasId;

    /**
     * 节点名称
     */
    @TableField("name")
    private String name;

    /**
     * 节点坐标x
     */
    @TableField("x")
    private Double x;

    /**
     * 节点坐标y
     */
    @TableField("y")
    private Double y;

    /**
     * 节点基础类型，参照NodeBaseTypeEnum
     */
    @TableField("base_type")
    private Integer baseType;

    /**
     * 节点展示类型 (前端定义)
     */
    @TableField("show_type")
    private String showType;

    /**
     * 组件锚点(前端定义)
     */
    @TableField("anchor_points")
    private String anchorPoints;

    /**
     * 是否是目标节点  0-不是  1-是
     */
    @TableField("within_target")
    private Integer withinTarget;

    /**
     * 执行时间延迟类型:DelayTypeEnum
     */
    @TableField("execute_time_type")
    private Integer executeTimeType;

    /**
     * 延迟执行的时间类型:TimeTypeEnum
     */
    @TableField("delay_time_type")
    private Integer delayTimeType;

    /**
     * 延迟执行的时间类型的值
     */
    @TableField("delay_time_value")
    private Integer delayTimeValue;

    /**
     * 判否类型:DelayTypeEnum
     */
    @TableField("judge_no_type")
    private Integer judgeNoType;

    /**
     * 延迟判否的时间类型:TimeTypeEnum
     */
    @TableField("delay_judge_no_time_type")
    private Integer delayJudgeNoTimeType;

    /**
     * 延迟判否的时间类型的值
     */
    @TableField("delay_judge_no_time_value")
    private Integer delayJudgeNoTimeValue;

    /**
     * js表达式，用来处理判断
     */
    @TableField("conditional_expression")
    private String conditionalExpression;

    /**
     * 表达式原始数据，json格式
     */
    @TableField("conditional_original")
    private String conditionalOriginal;

    /**
     * 触达组件id ( <=0 认为没有绑定触达组件)
     */
    @TableField("reach_id")
    private Integer reachId;

    /**
     * 触达组件类型 ReachTypeEnum
     */
    @TableField("reach_type")
    private Integer reachType;

    /**
     * 请求触达组件的参数 json
     */
    @TableField("reach_body")
    private String reachBody;

    /**
     * 进入节点数量
     */
    @TableField("enter_count")
    private Long enterCount;

    /**
     * 触达成功数量 (如果当前节点包含触达方式)
     */
    @TableField("reach_count")
    private Long reachCount;


    @Override
    protected Serializable pkVal() {
        return null;
    }

}
